package itheima.mapper;

import itheima.domain.OrderForm;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Update;

public interface OrderFormMapper {
    @Insert("INSERT INTO order_form(id, order_number, quantity, monery, buy_leads, payment, message, order_time, state, particulars) values (#{id},#{order_number},#{quantity},#{monery},#{buy_leads},#{payment},#{message},#{order_time},#{state},#{particulars})")
    void insertOrderForm(OrderForm orderForm);
    @Update("update order_form set order_number=#{order_number},quantity=#{quantity},monery=#{monery}, buy_leads=#{buy_leads},payment=#{payment},message= #{message}, order_time=#{order_time}, state=#{state}, particulars=#{particulars} where id=#{id}")
    void updateOrderForm(OrderForm orderForm);
    @Delete("delete from order_form where id=#{id}")
    void deleteOrderForm(Integer id);
}